//
//  World.h
//  Box2DTest
//
//  Created by David Wagner on 19/06/2009.
//  Copyright 2009 Zygote Commando. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <OpenGLES/EAGL.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import "Box2D.h"
#import "Actor.h"

@interface World : NSObject <UIAccelerometerDelegate>
{
	b2World* world;

	NSMutableArray* actors;
	
	NSTimeInterval lastUpdate;
	NSTimeInterval updateAccumulator;
	BOOL updateGraphics;

    UIAccelerationValue accelerationX;
    UIAccelerationValue accelerationY;

    UIAccelerationValue tAccelerationX;
    UIAccelerationValue tAccelerationY;
}

- (void)createSquareActorAtX: (float)x Y: (float)y theOne: (BOOL)theOne;

- (BOOL) tick;
- (void) draw;

@end
